Generating Specialized Interpreters for Modular Structural Operational Semantics
نویسندگان
چکیده
Modular Structural Operational Semantics (MSOS) is a variant of Structural Operational Semantics (SOS). It allows language constructs to be specified independently, such that no reformulation of existing rules in an MSOS specification is required when a language is extended with new constructs and features. Introducing the Prolog MSOS tool, we first recall how to synthesize executable interpreters from small-step MSOS specifications by compiling MSOS rules to Prolog clauses. Implementing the transitive closure of compiled clauses gives an executable interpreter in Prolog. Such interpreters, however, traverse each intermediate program term, resulting in a significant overhead in each step. We then show how to transform small-step MSOS specifications into corresponding big-step specifications via a two-step specialization by internalizing and extending the rules implementing the transitive closure in MSOS. Specialized specifications result in generated interpreters with significantly reduced interpretive overhead.
منابع مشابه
TVLA: A system for generating abstract interpreters
The course will present TVLA (Three-Valued-Logic Analyzer). TVLA is a ”‘YACC’”’-like framework for automatically constructing abstract interpreters from an operational semantics. The operational semantics is specified as a generic transition system based on first order logic. TVLA has been implemented in Java and was successfully used to prove interesting properties of (concurrent) Java program...
متن کاملThe rewriting logic semantics project
Rewriting logic is a flexible and expressive logical framework that unifies algebraic denotational semantics and structural operational semantics (SOS) in a novel way, avoiding their respective limitations and allowing succinct semantic definitions. The fact that a rewrite logic theory’s axioms include both equations and rewrite rules provides a useful “abstraction dial” to find the right balan...
متن کاملModelling the Operational Semantics of Domain-Specific Modelling Languages
Domain-specific modelling languages provide modelling means tailored to a particular domain. In Model-driven Engineering, it is common practice to specify such languages by modelling means as well. In this paper, we investigate structural operational semantics for domainspecific modelling languages. Thereby, we rely completely on standard modelling means as provided by the Object Management Gro...
متن کاملOn the Denotational Semantics of Staged Execution of Open Code
The functional meta-programming language MetaML of Sheard et al contains explicit staging constructs for generating and executing code. It provides a much finer control over the order of computation than traditional languages with fixed-evaluation strategies. This paper presents a novel denotational semantics for untyped MetaML that provides a remarkably simple treatment of two semantically pro...
متن کاملThree Semantics for Modular Systems
In this paper, we further develop the framework of Modular Systems that lays model-theoretic foundations for combining different declarative languages, agents and solvers. We introduce a multi-language logic of modular systems. We define two novel semantics, a structural operational semantics, and an inference-based semantics. We prove the new semantics are equivalent to the original model-theo...
متن کامل